﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.models.world.vos.actors.machines {
    import flash.events.*;
    import net.wooga.pets.events.*;
    import net.wooga.pets.interfaces.*;
    import net.wooga.pets.models.world.vos.actors.*;
    import net.wooga.pets.constants.*;

    public class AbstractMachineVO extends AbstractActorVO implements IMachine, ITicking {

        protected var _operator:ITreating;
        protected var _patient:ITreatable;
        protected var _actionsActive:Boolean;// = true

        public function AbstractMachineVO(_arg1:Object, _arg2:IEventDispatcher){
            _arg1[ProtocolConstants.ACTOR_TYPE] = _arg1[ProtocolConstants.ROOM_TYPE];
            _arg1[ProtocolConstants.ROOM_ID] = _arg1[ProtocolConstants.ID];
            super(_arg1, _arg2);
        }
        override public function get id():String{
            return (("m" + super.id));
        }
        public function onTick(_arg1:Boolean=true, _arg2:Number=0):void{
            this.handleTick(_arg2);
        }
        public function handlePatient(_arg1:ITreatable):void{
        }
        public function handleBaby(_arg1:IBaby, _arg2:Boolean):void{
            var _local3:String;
            if ((((_arg1.state == WorldConstants.BABY)) && (!(_arg2)))){
                if (_arg1.currentTreatment){
                    _local3 = ((_arg1.type + "_") + WorldConstants.BABY);
                    dispatch(new InfoEvent(EventConstants.PRELOAD_BABY, _local3.toLowerCase()));
                    _arg1.moveToNextTarget(GameConstants.TYPE_KINDERGARTEN);
                    dispatch(new InfoEvent(EventConstants.HANDLE_NEXT_IN_QUEUE, type));
                };
            };
        }
        public function checkState():void{
        }
        public function get isFree():Boolean{
            return (true);
        }
        public function get patient():ITreatable{
            return (this._patient);
        }
        public function set operator(_arg1:ITreating):void{
            this._operator = _arg1;
        }
        public function getAction(_arg1:Object):InfoEvent{
            return (null);
        }
        override public function destroy():void{
            super.destroy();
            dispatch(new TickingEvent(TickingEvent.REMOVE_TICKING, this));
        }
        protected function handleTick(_arg1:int):void{
        }
        protected function get updateEvent():InfoEvent{
            return (new InfoEvent(EventConstants.UPDATE_ACTOR, this.id));
        }
        public function get actionsActive():Boolean{
            return (this._actionsActive);
        }
        public function set actionsActive(_arg1:Boolean):void{
            this._actionsActive = _arg1;
        }

    }
}//package net.wooga.pets.models.world.vos.actors.machines 
